<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: VideoCamera_IAT</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: VideoCamera_IAT</td>
      <td class="subheader-left"><a href="matlab:open VideoCamera_IAT">View code for VideoCamera_IAT</a></td>
    </tr>
  </table>
<h1>VideoCamera_IAT</h1><p><span class="helptopic">Class to read from local video camera</span></p><p>
A concrete subclass of ImageSource that acquires images from a local
camera using the MATLAB Image Acquisition Toolbox (imaq).  This Toolbox
provides a multiplatform interface to a range of cameras, and this
class provides a simple wrapper.

</p>
<p>
This class is not intended to be used directly, instead use the factory
method Video which will return an instance of this class if the Image
Acquisition Toolbox is installed, for example

</p>
<pre style="width: 90%%;" class="examples">
vid&nbsp;=&nbsp;VideoCamera();
</pre>
<h2>Methods</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1"> grab</td> <td>Aquire and return the next image</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> size</td> <td>Size of image</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> close</td> <td>Close the image source</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> char</td> <td>Convert the object parameters to human readable string</td></tr>
</table>
<h2>See also</h2>
<p>
<a href="matlab:doc videocamera">videocamera</a>, <a href="matlab:doc ImageSource">ImageSource</a>, <a href="matlab:doc AxisWebCamera">AxisWebCamera</a>, <a href="matlab:doc Movie">Movie</a></p>
<hr>
<a name="VideoCamera_IAT"><h1>VideoCamera_IAT.VideoCamera_IAT</h1></a>
<p><span class="helptopic">Video camera constructor</span></p><p>
<strong>v</strong> = <span style="color:red">Video_IAT</span>(<strong>camera</strong>, <strong>options</strong>) is a Video object that acquires
images from the local video camera specified by the string <strong>camera</strong>.

</p>
<h2>Options</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1"> 'uint8'</td> <td>Return image with uint8 pixels (default)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'float'</td> <td>Return image with float pixels</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'double'</td> <td>Return image with double precision pixels</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'grey'</td> <td>Return greyscale image</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'gamma', G</td> <td>Apply gamma correction with gamma=G</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'scale', S</td> <td>Subsample the image by S in both directions.</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'resolution', S</td> <td>Obtain an image of size S=[W H].</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'id', I</td> <td>ID of camera</td></tr>
</table>
<p>
Notes:

</p>
<ul>
  <li>The specified 'resolution' must match one that the camera is capable of,
otherwise the result is not predictable.</li>
</ul>
<hr>
<a name="char"><h1>VideoCamera_IAT.char</h1></a>
<p><span class="helptopic">Convert to string</span></p><p>
V.<span style="color:red">char</span>() is a string representing the state of the camera object in
human readable form.

</p>
<hr>
<a name="close"><h1>VideoCamera_IAT.close</h1></a>
<p><span class="helptopic">Close the image source</span></p><p>
V.<span style="color:red">close</span>() closes the connection to the camera.

</p>
<hr>
<a name="grab"><h1>VideoCamera_IAT.grab</h1></a>
<p><span class="helptopic">Acquire image from the camera</span></p><p>
<strong>im</strong> = V.<span style="color:red">grab</span>() acquires an image from the camera.

</p>
<h2>Notes</h2>
<ul>
  <li>the function will block until the next frame is acquired.</li>
</ul>
<hr>
<a name="list"><h1>VideoCamera_IAT.list</h1></a>
<p><span class="helptopic">available adaptors and cameras</span></p><hr>
<a name="preview"><h1>VideoCamera_IAT.preview</h1></a>
<p><span class="helptopic">Control image preview</span></p><p>
V.<span style="color:red">preview</span>(<strong>true</strong>) enables camera <span style="color:red">preview</span> in a separate window

</p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2012 Peter Corke.</p>
</body></html>